<% @page_title = @user.username %>

<h1>Edit Your Profile</h1>

<%= render :partial => 'shared/error_notice', :locals => { :error => flash[:error], :notice => flash[:notice] } %>

<% form_for :user, @user, :url => { :action => :profile } do |f| %>
	<table class="layout_table">
	<tr>
		<td class="right"><label for="user_display_name" class="required">Display Name:</label></td>
		<td><%= f.text_field :display_name, :class => 'fixed' %></td>
	</tr>
	<tr>
		<td class="right"><label for="user_email_address" class="required">Email Address:</label></td>
		<td><%= f.text_field :email_address, :class => 'fixed' %></td>
	</tr>
	<tr>
		<td></td>
		<td class="right"><%= submit_tag 'Update Profile' %></td>
	</tr>
	</table>
<% end -%>

<h1>Change Your Password</h1>

<%= render :partial => 'shared/error_notice', :locals => { :error => flash[:password_error], :notice => flash[:password_notice] } %>

<% form_tag :action => :change_password do -%>
	<table class="layout_table">
	<tr>
		<td class="right"><label for="old_password" class="required">Old Password:</label></td>
		<td><%= password_field_tag :old_password, '', :class => 'fixed' %></td>
	</tr>
	<tr>
		<td class="right"><label for="new_password_1" class="required">New Password:</label></td>
		<td><%= password_field_tag :new_password_1, '', :class => 'fixed' %></td>
	</tr>
	<tr>
		<td class="right"><label for="new_password_2" class="required">Confirm Password:</label></td>
		<td><%= password_field_tag :new_password_2, '', :class => 'fixed' %></td>
	</tr>
	<tr>
		<td></td>
		<td class="right"><%= submit_tag 'Change Password' %></td>
	</tr>
	</table>
<% end -%>
